@{block #content}

<script type="text/javascript">
$(document).ready(function(){
    var counter = 0;
    {foreach $samples as $sample}
    counter++;
    $("#sample" + counter + " img").click(function(event){
       	if (!dragging) {
       		celebriogalleryappLink({link Default:image, $sample->getGalleryID(), $sample->getUserID(), $sample->getServiceName()});
       	}
	});
    {/foreach}

	resizer("sample", 31);
	$("#celebrioGalleryApp_samples").css({"width" : widthCount("sample")});
	iScrollLoad();
   /*$("#celebrioGalleryApp_samples").draggable({
        'axis' : 'x',
        'distance' : 30,
        start : function (event, ui) {
            dragging = true;
        },
        stop : function () {
            setTimeout(function() {
            dragging = false;}, 200);
        	$("#celebrioGalleryApp_samples").dragBack();
        }
    });	
	$("#celebrioGalleryApp_contents").overscroll({
		"direction" : "horizontal",
		"wheelDirection" : "horizontal"
	});*/
	
	//$("#celebrioGalleryApp_samples").dragBack();
	
	$("#celebrioGalleryApp_samples").mousedown(function(){
    	$(this).stop();
    });

   	$(window).resize(function() {
   		resizer("sample", 31);
   		$("#celebrioGalleryApp_samples").css({"width" : widthCount("sample")});
    	$("#celebrioGalleryApp_samples").stop();
   		//$("#celebrioGalleryApp_samples").dragBack();
	});
});
</script>

<div id="celebrioGalleryApp_samples">
    {var $counter 1}
    {foreach $samples as $sample}
    <div id="sample{$counter}" class="celebrioGalleryApp_sample">
        <img src="{$sample->getPictureUrl()}"/>
        <div id="sample{$counter++}_description" class="celebrioGalleryApp_sample_description">
            {$sample->getGalleryName()}
        </div>
    </div><!-- height={$sample->getHeight()} -->
    {/foreach}
    <!--{*{foreach $samplesUrl as $name => $photos}
    <div class="celebrioGalleryApp_sample">
    <a rel="shadowbox[{$name}];width=800;height=600;" href="#"><img src="{link Default:sample, $name}" /></a>
        {foreach $photos as $photo}
        <a rel="shadowbox[{$name}];width=800;height=600;" href="{link Default:image, $photo}" ></a>
        {/foreach}
    </div>
    {/foreach}*}-->   
</div>

{/block}